import { Controller, Get, Param } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { Product_Service } from '../product/product.service';
import { util_ApiResponse_Base } from '@/common/util/apiResponse';
import { util_Index_ReturnContent } from '@/common/util/index';

@Controller('/web/productWeb')
@ApiTags('productWeb 规格')
export class ProductWeb_Controller {
  constructor(private readonly product_Servicc: Product_Service) {}

  @Get('/platformId/:id')
  @util_ApiResponse_Base({
    dataType: 'dataType_ell',
    //apiKey: '/web/productWeb/platformId/:id Get',
    summary: '查询平台下的所有规格',
  })
  async product_ProductsWeb(@Param('id') id: number) {
    return util_Index_ReturnContent(await this.product_Servicc.product_ProductsWeb(id));
  }
  @Get('/detail/:id')
  @util_ApiResponse_Base({
    dataType: 'dataType_ell',
    //apiKey: '/web/productWeb/platformId/:id Get',
    summary: '查询规格对应的平台规格信息',
  })
  async product_ProductPlatformWeb(@Param('id') id: number) {
    return util_Index_ReturnContent(await this.product_Servicc.product_ProductPlatformWeb(id));
  }
}
